home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / 3dlib30a.zip / 3DC.DOC < prev    next >
Text File  |  1994-03-10  |  7KB  |  178 lines

  1.  
  2.  ╔══════════════════════════════════════════════════════════════════════════╗
  3.  ║                                                                          ║
  4.  ║                               HyperAct, Inc.                             ║
  5.  ║                               P.O.Box. 5517                              ║
  6.  ║                         Coralville IA 52241 U.S.A                        ║
  7.  ║                          Compuserve - 76350,333                          ║
  8.  ║                        Phone/Fax - (319) 351-8413                        ║
  9.  ║                                                                          ║
  10.  ╚══════════════════════════════════════════════════════════════════════════╝ 
  11.  
  12. *******************************************************************************
  13. *                              3dC DOCUMENTATION                              *
  14. * Last Update : Feb. 15, 1994.                                                *
  15. *******************************************************************************
  16.  
  17. *******************************************************************************
  18. *                                INTRODUCTION                                 *
  19. *******************************************************************************
  20.  
  21.  
  22. 3dC is a translator that converts 3D animation macros (M3D files) into
  23. Borland Pascal 7.0 source programs that can be used with the 3dLIB package
  24. to create 3D animation executables, or 3D animation procedures that can
  25. be implemented in your programs.
  26.  
  27. The generator can create code for DOS and Windows, from the same source!.
  28.  
  29. M3D macro programs can be animated for test purposes using the HyperAct, Inc. 
  30. distributed 3D120 package, Or the supplied 3dA program.
  31. You can use 3DC to create animated programs without this package. 
  32.  
  33. Please note : older versions of the 3D program that were distributed as 
  34. 3D100 and 3D110 packages are supported, but a small change in the macro
  35. language exist in the GOTO command, that uses ',' to separate arguments, 
  36. while the older versions used only spaces, that could cause improper
  37. translation when negative arguments were passed.
  38.  
  39. *******************************************************************************
  40. *                                    USAGE                                    *
  41. *******************************************************************************
  42.  
  43. At the command line type 
  44.  
  45. 3DC input.m3d [output.pas]
  46.  
  47. Where input.m3d is the name of the input macro language.
  48.  
  49. If no output name is specified 3DC creates a Pascal source file called
  50. 3DPAS.PAS .
  51.  
  52. To compile the generated source file use Turbo Pascal 6.0 with the following
  53. command :
  54.  
  55. TPC /M source.pas 
  56.  
  57. or BP7 with 
  58.  
  59. BPC /m source
  60.  
  61. Be sure that the compiler can find the GRAPH.TPU file supplied with 
  62. Turbo/Borland Pascal.
  63.  
  64. To run the executable created type it's name in the command line, 
  65. and be sure that the required graphic .BGI file is in the current
  66. directory. (please refer to your Turbo Pascal manual about your .BGI file).
  67.  
  68. If you want 3dC to produce code for the Windows 3.0 or 3.1 environment use
  69. the /W+ switch on the command line, and compile using Turbo Pascal for Windows.
  70. (You can compile to windows targets with BP7 using BPC /cw .. as well).
  71.  
  72. If you run Windows you can use the supplied 3dCW.EXE program - a Windows
  73. hosted generator available from version 1.4 .
  74.  
  75. IMPORTANT - if you want the 3dCW program to find the HELP file, we recommend
  76. that you set the working directory of the 3dCW file in the program manager
  77. to the directory you installed the 3dCW.Hlp file!
  78.  
  79. *******************************************************************************
  80. *                               MACRO LANGUAGE                                *
  81. *******************************************************************************
  82.  
  83. The following commands are supported by the 3DC translator in the 3D Macro 
  84. language :
  85.  
  86. c               - Clear Screen .
  87. w               - set Color to White.
  88. b               - set Color to Black.
  89. p               - Paint Active object in last color.
  90. o0              - set Perspective off.
  91. o1              - set Perspective on.
  92. >x              - Start a loop to be performed x times.
  93. lfl             - Load simple object from file fl into the active object.
  94. Lfl             - Load complex object from file fl into the active object.
  95. rad             - Rotate Active Element In axis a, d degrees.
  96. ex              - Choose Active Element x.
  97. mas             - Move in a axis, s steps.
  98. gx,y,z          - Goto 3d pos x,y,z.
  99. saf             - Scale a axis in f factor.
  100. v0..v9          - variable names.
  101. <               - End Loop.
  102. \               - End line.
  103. z               - set object to center.
  104. Rsad            - rotate a sub object of a complex object around axis a, 
  105.                   d degrees.
  106. Msas            - move a sub object of a complex object in axis a, s steps.
  107. Ssaf            - scale a sub object of a complex object around axis a, 
  108.                   by a factor of f.
  109. #c              - Change color to c. 
  110. ? c [ t | f ]   - If c execute t, otherwise execute f, where c is a 
  111.                   conditional expression, t and f are macro language statements.
  112. !function(parm) - Calls a pre-defined function, with a list of parameters.
  113.  
  114.  
  115. Special Notes : 
  116.  
  117. A number must end with a space character.
  118.  
  119. Loops can be nested 10 levels deep in the 3D120 package, but 3DC can translate
  120. even more levels than that.
  121.  
  122. any numeric expressions requested can be given with a normal infix notation, 
  123. for example :
  124.  
  125.     rx30 * v1 + 2
  126.  
  127. will rotate the current active object around the x axis, by 2 plus 30 * v1 
  128. degrees, where v1 is a variable.
  129.  
  130. The expression can contain numeric functions in them. The supported functions
  131. are :
  132.  
  133. @sin, @cos, @sqr, @cotan, @ln, @log10, @log2, @abs, @arctan, @arccos, @exp,
  134. @e, @tan, @pi, @random. 
  135.  
  136.  
  137. The color table is :
  138.  
  139.     Black        =  0
  140.     Blue         =  1
  141.     Green        =  2
  142.     Cyan         =  3
  143.     Red          =  4
  144.     Magenta      =  5
  145.     Brown        =  6
  146.     LightGray    =  7
  147.     DarkGray     =  8
  148.     LightBlue    =  9
  149.     LightGreen   = 10
  150.     LightCyan    = 11
  151.     LightRed     = 12
  152.     LightMagenta = 13
  153.     Yellow       = 14
  154.     White        = 15
  155.  
  156. The following functions are supported :
  157.  
  158. (Notice that 3d objects are NOT effected by these functions)
  159.  
  160. gotoxy(x, y)                            - Move the graphic cursor to x, y.
  161. textout("string")                       - Display string at graphic cursor.
  162. ellipse(cx, cy, rx, ry)                 - Draws an ellipse center at cx, yx,
  163.                                           Radiuses are rx, ry.
  164. line(x1, y1, x2, y2)                    - Draws a line from x1,y1 to x2,y2.
  165. rectangle(x1, y1, x2, y2)               - Draws a rectangle with upper-left
  166.                                           corner x1,y1, and bottom-right x2,y2.
  167.  
  168. *******************************************************************************
  169. *                                   Credits                                   *
  170. *******************************************************************************
  171.  
  172. These Programs were written by Ron Loewy.
  173.  
  174. 3dLIB and 3dC were written using Turbo Pascal V6.0, Turbo Pascal for Windows 
  175. V1.5 and Borland Pascal with objects V7.0, trademarks of Borland International.
  176.  
  177. Windows 3.0 and Windows 3.1 are trademarks of Microsoft Corp.
  178.